package com.dong.design.memento.memento_prototype;

/**
 * @author jianyang206881
 * @date 2018/6/28
 */
public class Hero implements Cloneable {
    private String name;
    private int health;
    private int magic;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getHealth() {
        return health;
    }

    public void setHealth(int health) {
        this.health = health;
    }

    public int getMagic() {
        return magic;
    }

    public void setMagic(int magic) {
        this.magic = magic;
    }

    @Override
    protected Object clone() throws CloneNotSupportedException {
        return super.clone();
    }

    @Override
    public String toString() {
        return "Hero{" +
                "name='" + name + '\'' +
                ", health=" + health +
                ", magic=" + magic +
                '}';
    }
}
